<%@ include file="/init.jsp" %>
<%@page session="false" contentType="text/html" pageEncoding="UTF-8"
	import="javax.portlet.*,com.mandala.portlet.*"%>
<%
	String url = (String) request.getAttribute(SsoSystemManagePortlet.URL);
	String userId = (String) request.getAttribute(SsoSystemManagePortlet.USERID);
	String userToken = (String) request.getAttribute("userToken");
	if(url != null && url.startsWith("http://")){
		url += "/ssoSystem/login?act=config";
		url = (url.indexOf("?")==-1)?(url+"?userId="+userId+"&token="+userToken):(url+"&userId="+userId+"&token="+userToken);
	}
%>
<iframe border="0" frameborder="0" scrolling="no" id="<portlet:namespace />iframe" 
name="<portlet:namespace />iframe" src="<%= url %>" width="100%" height="500px">
</iframe>
<aui:script use="aui-resize-iframe">
	var iframe = A.one('#<portlet:namespace />iframe');
	if (iframe) {
		iframe.plug(
			A.Plugin.ResizeIframe,
			{
				monitorHeight: true
			}
		);
		iframe.on(
			'load',
			function() {
				var height = A.Plugin.ResizeIframe.getContentHeight(iframe);
				if (height == null) {
					height = '600%';
					iframe.setStyle('height', height);
					iframe.resizeiframe.set('monitorHeight', false);
				}
			}
		);
	}
</aui:script>